package o2plalindrome;

import java.time.chrono.IsoChronology;

/**
 * @author shkstart
 * @create 2021-12-27-21:58
 */
/*
*
* 判断回文
*
* */
public class Solution02 {

    public static void main(String[] args) {

        boolean palindrome = isPalindrome(11011);

        System.out.println(palindrome);

    }

    public static boolean isPalindrome(int x) {
        if (x < 0) {
            return false;
        }
        int cur = 0;
        int num = x;
        while (num != 0) {
            cur = cur * 10 + num % 10;
            num /= 10;
        }
        return cur == x;
    }

}
